﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/SiteContent.Master" AutoEventWireup="true"
    CodeBehind="Bills.aspx.cs" Inherits="Warehouse.Web.Purchase.Bills" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .modulecontent ul li {
            display: block;
            float: left;
            margin: 5px;
            width: 72px;
            height: 95px;
            background: #fff;
            text-align: center;
        }
    </style>

    <script type="text/javascript">
        function showBill(type) {
            var title = ['', '进货单', '进货赠品单', '进货退货单'][type];
            top.showWindow("/Purchase/BillView.aspx?type=" + type, { title: title, width: 700, height: 500 }, null);
        }
        function showPayment(receipt) {
            var title = ['进货付款单', '退货收款单'][receipt]
            top.showWindow("/Purchase/PaymentView.aspx?" + (receipt ? "receipt=receipt" : ""), { title: title, width: 700, height: 500 }, null);
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="moduleheader">
        <h4>
            单据录入</h4>
    </div>
    <div class="modulecontent">
        <ul>
            <uc:AuthorityControl runat="server" TargetPage="/Purchase/BillView.aspx" Action="View">
                <li><a href="#" onclick="showBill(<%= (int)Warehouse.DataAccess.PurchaseBillType.Purchase %>);return false;">
                    <asp:Image runat="server" ImageUrl="~/uploads/images/purcharse.gif" AlternateText="进货单" /></a></li>
                <li><a href="#" onclick="showBill(<%= (int)Warehouse.DataAccess.PurchaseBillType.Gift %>);return false;">
                    <asp:Image ID="Image2" runat="server" ImageUrl="~/uploads/images/purcharse_gift.gif"
                        AlternateText="供应商赠品" /></a></li>
                <li><a href="#" onclick="showBill(<%= (int)Warehouse.DataAccess.PurchaseBillType.Return %>);return false;">
                    <asp:Image ID="Image1" runat="server" ImageUrl="~/uploads/images/purcharse_return.gif"
                        AlternateText="退货单" /></a></li>
            </uc:AuthorityControl>
            <uc:AuthorityControl runat="server" TargetPage="/Purchase/PaymentView.aspx" Action="View">
                <li><a href="#" onclick="showPayment(0);return false;">
                    <asp:Image ID="Image3" runat="server" ImageUrl="~/uploads/images/payment.gif" AlternateText="付款单" /></a></li>
                <li><a href="#" onclick="showPayment(1);return false;">
                    <asp:Image ID="Image4" runat="server" ImageUrl="~/uploads/images/receipt.gif" AlternateText="收款单" /></a></li>
            </uc:AuthorityControl>
        </ul>
    </div>
</asp:Content>
